<div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" style="">
    <div class="padding20px">
        <div class="insm-col1"><label>Start date</label><div class="clear"></div></div>
        <div class="insm-col2"><label>Start Time</label><div class="clear"></div></div>
        <div class="insm-col2"><label>End Time</label><div class="clear"></div></div>
        <div class="insm-col3"> <label style="margin:4px 0px 15px 9px">Flexible</label> <div class="clear"></div></div>
        <?php
        for ($dateIndex = 0; $dateIndex < count($dateSesion); $dateIndex++) {
            $dateSessionIs_flexible = ($dateSesion[$dateIndex]->is_flexible==1) ? 1 : 0;
            $addClass = ($dateSesion[$dateIndex]->is_flexible == 1) ? '' : 'hastimePicker requiredfield';
            ?>
            <div class="insm-col1"> 
                <input class="field small requiredfield" onpaste="return false;" onclick="hasDatepicker(this.id)" name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][date][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_date_<?php echo $dateIndex; ?>" type="text" placeholder="Date" value="<?php echo $dateSesion[$dateIndex]->date; ?>">
                <div class="errorMessage" id="error_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_date_<?php echo $dateIndex; ?>" style="display:none">Schedule cannot be blank.</div>
            </div>
            <div class="insm-col2 bootstrap-timepicker"><div class="clear"></div>
                <input onblur="checkValueEmpty(this.id);" name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_from][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dateIndex; ?>" type="text" onclick="hastimePicker(this.id)" onpaste="return false;" class=" field small <?php echo $addClass; ?>" value="<?php echo $dateSesion[$dateIndex]->time_from; ?>" onchange="timeCheck(this.id);">
                <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dateIndex; ?>" style="display:none">Start time cannot be blank.</div>
            </div>
            <div class="insm-col2 bootstrap-timepicker"><div class="clear"></div>
                <input name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_to][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dateIndex; ?>" onclick="hastimePicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id);" class="<?php echo $addClass; ?> field small" type="text" size="10" value="<?php echo $dateSesion[$dateIndex]->time_to; ?>" onchange="timeCheck(this.id);">
                <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dateIndex; ?>" style="display:none">End time cannot be blank.</div>
                <div class="errorMessage" id="endTime_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dateIndex; ?>" ></div>

            </div>
            <div class="insm-col3 ">  <div class="clear"></div>
                <input <?php if ($dateSesion[$dateIndex]->is_flexible) { ?>checked="checked"<?php } ?> type="checkbox" class="isdaySesionFlexble" value="<?php echo $dateSesion[$dateIndex]->is_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexible_<?php echo $dateIndex; ?>" onclick="return isFlexibleDaySession(this.id);" name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexible][]">
                <input type="hidden" name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexiblevalue][]" value="<?php echo $dateSessionIs_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexiblevalue_<?php echo $dateIndex; ?>">
            </div><div class="clear"></div>
        <?php } ?>
    </div>
</div>